package com.ruoyi.shop.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.shop.mapper.AtrShopCategoryMapper;
import com.ruoyi.shop.domain.AtrShopCategory;
import com.ruoyi.shop.service.IAtrShopCategoryService;

/**
 * 商品类目Service业务层处理
 * 
 * @author The thinking reed
 * @date 2022-10-28
 */
@Service
public class AtrShopCategoryServiceImpl implements IAtrShopCategoryService 
{
    @Autowired
    private AtrShopCategoryMapper atrShopCategoryMapper;

    /**
     * 查询商品类目
     * 
     * @param id 商品类目主键
     * @return 商品类目
     */
    @Override
    public AtrShopCategory selectAtrShopCategoryById(Long id)
    {
        return atrShopCategoryMapper.selectAtrShopCategoryById(id);
    }

    /**
     * 查询商品类目列表
     * 
     * @param atrShopCategory 商品类目
     * @return 商品类目
     */
    @Override
    public List<AtrShopCategory> selectAtrShopCategoryList(AtrShopCategory atrShopCategory)
    {
        return atrShopCategoryMapper.selectAtrShopCategoryList(atrShopCategory);
    }

    /**
     * 新增商品类目
     * 
     * @param atrShopCategory 商品类目
     * @return 结果
     */
    @Override
    public int insertAtrShopCategory(AtrShopCategory atrShopCategory)
    {
        return atrShopCategoryMapper.insertAtrShopCategory(atrShopCategory);
    }

    /**
     * 修改商品类目
     * 
     * @param atrShopCategory 商品类目
     * @return 结果
     */
    @Override
    public int updateAtrShopCategory(AtrShopCategory atrShopCategory)
    {
        return atrShopCategoryMapper.updateAtrShopCategory(atrShopCategory);
    }

    /**
     * 批量删除商品类目
     * 
     * @param ids 需要删除的商品类目主键
     * @return 结果
     */
    @Override
    public int deleteAtrShopCategoryByIds(Long[] ids)
    {
        return atrShopCategoryMapper.deleteAtrShopCategoryByIds(ids);
    }

    /**
     * 删除商品类目信息
     * 
     * @param id 商品类目主键
     * @return 结果
     */
    @Override
    public int deleteAtrShopCategoryById(Long id)
    {
        return atrShopCategoryMapper.deleteAtrShopCategoryById(id);
    }
}
